﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Freebase4net.Tests
{
    [TestClass]
    public class TopicServiceTests
    {
        private TopicService _topicService;
        private string _id;

        public TopicServiceTests()
        {
            _topicService = FreebaseServices.CreateTopicService();
            _id = "/en/the_animal";
        }

        [TestMethod]
        public void Read_Id()
        {
            var result = _topicService.Read(_id);


            Assert.AreEqual(System.Net.HttpStatusCode.OK, result.Status);
        }

        [TestMethod]
        public async Task ReadAsync_Id()
        {
            var result = await _topicService.ReadAsync(_id);


            Assert.AreEqual(System.Net.HttpStatusCode.OK, result.Status);
        }
    }
}
